package operation;
import book.book;
import book.booklist;

import java.awt.print.Book;
import java.util.Scanner;

public class add implements ioperation {
    public void work(booklist booklist){
        System.out.println("add");
        Scanner scanner= new Scanner(System.in);
        System.out.println("输入图书名字");
        String name =scanner.nextLine();
        System.out.println("输入图书author");
        String author=scanner.nextLine();
        System.out.println("输入图书leixing");
        String type=scanner.nextLine();
        System.out.println("输入图书price");
        int price=scanner.nextInt();


        book book= new book(name,author,price,type);
        int i=booklist.getUsedsize();
        booklist.setBooks(i,book);
        booklist.setUsedsize(i+1);
    }
}
